<template>
  <div class="m-sum-card">
    <dt>
      <h1>{{meta.name}}</h1>
      <el-rate v-model="rate" disabled />
      <span>{{Number(meta.biz_ext.rating) || rate}} 分</span>
      <span>人均￥{{Number(meta.biz_ext.cost)}}</span>
      <ul>
        <li @click="openMap(meta.location)"></li>
        <li>地址: {{meta.address}}</li>
        <li>电话: {{meta.tel}}</li>
        <li>营业时间：周一至周日 07:00-24:00</li>
      </ul>
    </dt>
    <dd>
      <el-carousel height="214px" indicator-position="none">
        <el-carousel-item v-for="(item, idx) in meta.photos" :key="idx">
          <h3><img :src="item.url" alt="" width="100%" height="100%"></h3>
        </el-carousel-item>
      </el-carousel>
    </dd>
  </div>
</template>
<script>
export default {
  props: {
    meta: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {
      sale: 70 + Math.floor(Math.random() * 300)
    }
  },
  computed: {
    rate() {
      // return Number(this.meta.biz_ext.rating) || Math.floor(Math.random() * 5)
      return 4
    }
  },
  methods: {
    openMap(location) {
      
    }
  }
}
</script>